package com.fuful;

import com.fuful.domian.Users;
import com.fuful.mappers.UsersMapper;
import com.fuful.utils.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        SqlSession sqlSession = MybatisUtil.getSqlSession();

        UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);

        usersMapper.addUsers(new Users("hobe","qaz123"));
        //非查询查询操作必须手动提交
        sqlSession.commit();

        MybatisUtil.closeSqlSession();
    }
}
